import {
  GraphQLList,
  GraphQLObjectType,
  GraphQLSchema,
  GraphQLString,
  GraphQLInt,
  GraphQLFloat,
  GraphQLEnumType,
  GraphQLNonNull
} from 'graphql'
import { stockBasics, stockList, updateStock, stockDailySummery } from './stock'

const Schema = new GraphQLSchema({
  query: new GraphQLObjectType({
    name: 'Queries',
    description: '查询股票基础数据',
    fields: {
      stockList,
      stockBasics,
      stockDailySummery
    }
  }),
  mutation: new GraphQLObjectType({
    name: 'Mutations',
    description: '修改数据',
    fields: {
      updateStock
    }
  })
})

export default Schema
